1. Field of the Invention
The present invention relates to a image-processing apparatus and its method intended to generate vector data based on raster data obtained by scanning graphic images as well as a computer program product storing image-processing programs for the same.
2. Description of Related Art
Scanning of a document generates raster data that expresses an image by a group of dots. A technology for converting this raster data into vector data (vector converting technology) is known. Once raster data is converted to vector data, it can be easily moved, scaled up or down, and rotated.
The Publication of Japanese Patent Application No. 6-195421 disclosed a technology for extracting line graphics (contour lines of graphic images) from raster data and a technology to generate vector data along the extracted line graphics. According to the technology shown on this publication, it executes the process of detecting the colors of the line graphics and covering the entire closed area surrounded by each line graphic with the color of the particular line graphic.
The technology of the publication is to extract line graphics from raster data, prepare vector data, and detect the color of each line graphic. However, the technology of the publication does not handle the information concerning the color within an enclosed area surrounded by a line graphic. Therefore, if the color of an enclosed area surrounded by a black contour line is green, it was not capable of handling the vector data generated along the black contour line and the information concerning the color (green) within the enclosed area as a package.
As can be seen from the above, while the prior art is able of showing line graphics extracted from raster data as vector data, it does not store the information concerning the colors of enclosed areas related to the vector data. Therefore, it causes a problem that it cannot recreate the colors of the enclosed areas surrounded by the line graphics in reusing the vector data, thus reducing the usefulness of the data.
Moreover, the technology disclosed by the publication does not take the line widths of line graphics into consideration when it extracts the line graphics from raster data. Consequently, when it extracts a line graphic from raster data and executes a vector conversion, it generates two enclosed areas, namely one that is surrounded by the outer edge of the frame line and another that is surrounded by the inner edge of the line as shown in FIG. 22. Consequently, when such vector data are used to perform a process of scaling up or down the images, it causes a problem that the line widths vary as a result of the above-mentioned process.